Integrand size = 26, antiderivative size = 69 \[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))} \, dx=\frac {x}{a^2 c}+\frac {\cot (e+f x) (3-2 \sec (e+f x))}{3 a^2 c f}-\frac {\cot ^3(e+f x) (1-\sec (e+f x))}{3 a^2 c f} \]
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.76 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.84 \[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))} \, dx=-\frac {\cot ^3(e+f x) \left (\operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},-\tan ^2(e+f x)\right )-3 \sec (e+f x)+2 \sec ^3(e+f x)\right )}{3 a^2 c f} \]
-1/3*(Cot[e + f*x]^3*(Hypergeometric2F1[-3/2, 1, -1/2, -Tan[e + f*x]^2] - 3*Sec[e + f*x] + 2*Sec[e + f*x]^3))/(a^2*c*f)
Time = 0.42 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.96, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3042, 4392, 3042, 4370, 25, 3042, 4370, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{(a \sec (e+f x)+a)^2 (c-c \sec (e+f x))} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^2 \left (c-c \csc \left (e+f x+\frac {\pi }{2}\right )\right )}dx\) |
\(\Big \downarrow \) 4392 |
\(\displaystyle \frac {\int \cot ^4(e+f x) (c-c \sec (e+f x))dx}{a^2 c^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {c-c \csc \left (e+f x+\frac {\pi }{2}\right )}{\cot \left (e+f x+\frac {\pi }{2}\right )^4}dx}{a^2 c^2}\) |
\(\Big \downarrow \) 4370 |
\(\displaystyle \frac {\frac {1}{3} \int -\cot ^2(e+f x) (3 c-2 c \sec (e+f x))dx-\frac {\cot ^3(e+f x) (c-c \sec (e+f x))}{3 f}}{a^2 c^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {-\frac {1}{3} \int \cot ^2(e+f x) (3 c-2 c \sec (e+f x))dx-\frac {\cot ^3(e+f x) (c-c \sec (e+f x))}{3 f}}{a^2 c^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {-\frac {1}{3} \int \frac {3 c-2 c \csc \left (e+f x+\frac {\pi }{2}\right )}{\cot \left (e+f x+\frac {\pi }{2}\right )^2}dx-\frac {\cot ^3(e+f x) (c-c \sec (e+f x))}{3 f}}{a^2 c^2}\) |
\(\Big \downarrow \) 4370 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {\cot (e+f x) (3 c-2 c \sec (e+f x))}{f}-\int -3 cdx\right )-\frac {\cot ^3(e+f x) (c-c \sec (e+f x))}{3 f}}{a^2 c^2}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {1}{3} \left (\frac {\cot (e+f x) (3 c-2 c \sec (e+f x))}{f}+3 c x\right )-\frac {\cot ^3(e+f x) (c-c \sec (e+f x))}{3 f}}{a^2 c^2}\) |
(-1/3*(Cot[e + f*x]^3*(c - c*Sec[e + f*x]))/f + (3*c*x + (Cot[e + f*x]*(3* c - 2*c*Sec[e + f*x]))/f)/3)/(a^2*c^2)
3.1.26.3.1 Defintions of rubi rules used
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( a_)), x_Symbol] :> Simp[(-(e*Cot[c + d*x])^(m + 1))*((a + b*Csc[c + d*x])/( d*e*(m + 1))), x] - Simp[1/(e^2*(m + 1)) Int[(e*Cot[c + d*x])^(m + 2)*(a* (m + 1) + b*(m + 2)*Csc[c + d*x]), x], x] /; FreeQ[{a, b, c, d, e}, x] && L tQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*( d_.) + (c_))^(n_.), x_Symbol] :> Simp[((-a)*c)^m Int[Cot[e + f*x]^(2*m)*( c + d*Csc[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && E qQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && RationalQ[n] && !( IntegerQ[n] && GtQ[m - n, 0])
Time = 0.55 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.72
method | result | size |
parallelrisch | \(\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+12 f x -12 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+3 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )}{12 a^{2} c f}\) | \(50\) |
derivativedivides | \(\frac {\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}-4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+8 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {1}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}}{4 f \,a^{2} c}\) | \(60\) |
default | \(\frac {\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}-4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+8 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {1}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}}{4 f \,a^{2} c}\) | \(60\) |
risch | \(\frac {x}{a^{2} c}-\frac {2 i \left (3 \,{\mathrm e}^{3 i \left (f x +e \right )}-5 \,{\mathrm e}^{i \left (f x +e \right )}-4\right )}{3 f \,a^{2} c \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{3} \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}\) | \(72\) |
norman | \(\frac {\frac {x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{c a}+\frac {1}{4 a c f}-\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{a c f}+\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{12 a c f}}{a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}\) | \(89\) |
Time = 0.25 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.01 \[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))} \, dx=\frac {4 \, \cos \left (f x + e\right )^{2} + 3 \, {\left (f x \cos \left (f x + e\right ) + f x\right )} \sin \left (f x + e\right ) + \cos \left (f x + e\right ) - 2}{3 \, {\left (a^{2} c f \cos \left (f x + e\right ) + a^{2} c f\right )} \sin \left (f x + e\right )} \]
1/3*(4*cos(f*x + e)^2 + 3*(f*x*cos(f*x + e) + f*x)*sin(f*x + e) + cos(f*x + e) - 2)/((a^2*c*f*cos(f*x + e) + a^2*c*f)*sin(f*x + e))
\[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))} \, dx=- \frac {\int \frac {1}{\sec ^{3}{\left (e + f x \right )} + \sec ^{2}{\left (e + f x \right )} - \sec {\left (e + f x \right )} - 1}\, dx}{a^{2} c} \]
Time = 0.29 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.48 \[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))} \, dx=-\frac {\frac {\frac {12 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{a^{2} c} - \frac {24 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a^{2} c} - \frac {3 \, {\left (\cos \left (f x + e\right ) + 1\right )}}{a^{2} c \sin \left (f x + e\right )}}{12 \, f} \]
-1/12*((12*sin(f*x + e)/(cos(f*x + e) + 1) - sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/(a^2*c) - 24*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/(a^2*c) - 3*( cos(f*x + e) + 1)/(a^2*c*sin(f*x + e)))/f
Time = 0.30 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.17 \[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))} \, dx=\frac {\frac {12 \, {\left (f x + e\right )}}{a^{2} c} + \frac {3}{a^{2} c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )} + \frac {a^{4} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 12 \, a^{4} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a^{6} c^{3}}}{12 \, f} \]
1/12*(12*(f*x + e)/(a^2*c) + 3/(a^2*c*tan(1/2*f*x + 1/2*e)) + (a^4*c^2*tan (1/2*f*x + 1/2*e)^3 - 12*a^4*c^2*tan(1/2*f*x + 1/2*e))/(a^6*c^3))/f
Time = 13.96 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00 \[ \int \frac {1}{(a+a \sec (e+f x))^2 (c-c \sec (e+f x))} \, dx=\frac {x}{a^2\,c}+\frac {\frac {4\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4}{3}-\frac {7\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{6}+\frac {1}{12}}{a^2\,c\,f\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )} \]